var str = 'asdffg zqweeaa';
var suv = '12344asde eq';
var i = 0;
function typing(){
    var divTyping = document.querySelector('#h5');
    if (i <= str.length) {
        divTyping.innerHTML = str.slice(0, i++) + '|';
        setTimeout('typing()', 100);//递归调用
    }
    else{
        divTyping.innerHTML = str;//结束打字,移除 _ 光标

    }
}
typing();

var tab = document.querySelector("nav");
    window.onscroll = function(){
        if(document.body.scrollTop > 100 || document.documentElement.scrollTop > 100){
            tab.className = "nav nav-fixed";
        }else {
            tab.className = "nav";
        }
    };

document.querySelector("")